//
//  ThirdTableViewCell.m
//  UI_豆瓣更新版
//
//  Created by dllo on 16/1/2.
//  Copyright © 2016年 lanou3g. All rights reserved.
//

#import "ThirdTableViewCell.h"

@implementation ThirdTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createSubviews];
    }
    return self;
}

- (void)dealloc {
    [_imgView release];
    [_nameLabel release];
    [_addressLabel release];
    [_phoneLabel release];
    [super dealloc];
}

- (void)createSubviews {
    self.imgView = [[UIImageView alloc] init];
    [self.contentView addSubview:_imgView];
    [_imgView release];
    
    self.nameLabel = [[UILabel alloc] init];
    [self.contentView addSubview:_nameLabel];
    [_nameLabel release];
    
    self.addressLabel = [[UILabel alloc] init];
    [self.contentView addSubview:_addressLabel];
    [_addressLabel release];
    
    self.phoneLabel = [[UILabel alloc] init];
    [self.contentView addSubview:_phoneLabel];
    [_phoneLabel release];
}

- (void)layoutSubviews {
    [super layoutSubviews];
    _imgView.frame = CGRectMake(15, 10, self.contentView.frame.size.width - 30, self.contentView.frame.size.height - 20);
    _imgView.image = [UIImage imageNamed:@"bg_eventlistcell@2x.png"];
    
    _nameLabel.frame = CGRectMake(30, 15, self.contentView.frame.size.width - 50, 50);
    _nameLabel.font = [UIFont systemFontOfSize:25];
    
    _addressLabel.frame = CGRectMake(30, 75, self.contentView.frame.size.width - 50, 50);
    _addressLabel.numberOfLines = 2;
    
    _phoneLabel.frame = CGRectMake(30, 150, self.contentView.frame.size.width - 50, 20);
    
    
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
